layui.define(function (exports) {
    var LDLayout = {
        setMinHeight: function () {
            var $header = $('.header');
            var $footer = $('.footer');
            var $content = $('#content_minHeight');
            if (!$content.length) return;
            var height = $(window).innerHeight() - $header.outerHeight() - $footer.outerHeight();
            $content.css({
                minHeight: height
            });
        },
        setBadgeVisible: function () {
            var val = $('.cart-action .badge').text();
            if (Number(val) > 0) {
                $('.cart-action .badge').show();
            }
        }
    };

    //输出test接口
    exports('LDLayout', LDLayout);
});